<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-sysSmsTemplate-edit" th:object="${sysSmsTemplate}">
            <input id="id" name="id" th:field="*{id}"  type="hidden">
			<div class="form-group">	
				<label class="col-sm-3 control-label">模版名称：</label>
				<div class="col-sm-8">
					<input id="name" name="name" th:field="*{name}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">模版编码：</label>
				<div class="col-sm-8">
					<input id="code" name="code" th:field="*{code}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
                <label class="col-sm-3 control-label">业务类型：</label>
                <div class="col-sm-8">
					<select id="businessType" name="businessType" class="form-control m-b" th:with="type=${@dict.getType('sms_business_type')}">
	                    <option th:each="dict : ${type}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}" th:field="*{businessType}"></option>
	                </select>
				</div>
            </div>
			<div class="form-group">	
                <label class="col-sm-3 control-label">模版ID：</label>
                <div class="col-sm-8">
                    <input id="templateId" disabled="disabled" name="templateId" th:field="*{templateId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">模版内容：</label>
                <div class="col-sm-8">
                    <textarea id="templateContent" name="templateContent" class="form-control">[[*{templateContent}]]</textarea>
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">备注信息：</label>
                <div class="col-sm-8">
                    <input id="remarks" name="remarks" th:field="*{remarks}" class="form-control" type="text">
                </div>
            </div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "message/sysSmsTemplate";
		$("#form-sysSmsTemplate-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-sysSmsTemplate-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
